<%@CODEPAGE="65001"%>
<!--#include file="aboutfun.asp" -->
<%getsort%>
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3c.org/tr/1999/rec-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>修改<%= SortName %></title>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<link href="images/style.css" type=text/css rel=stylesheet>
<link rel="stylesheet" href="../ZKeditor/themes/default/default.css" />
<link rel="stylesheet" href="../ZKeditor/plugins/code/prettify.css" />
<script type="text/javascript" src="../ZKeditor/kindeditor.js"></script>
<script type="text/javascript" src="../ZKeditor/plugins/code/prettify.js"></script>
<script type="text/javascript">
KindEditor.ready(function(K) {
    var editor = K.create('textarea[name="content"]', {
        cssPath : '../ZKeditor/plugins/code/prettify.css',
        uploadJson : '../ZKeditor/asp/upload_json.asp',
        fileManagerJson : '../ZKeditor/asp/file_manager_json.asp',
		urlType : 'relative',allowFileManager : true,
        afterCreate : function() {
	K('#insertHtml').click(function(e) {
		editor.insertHtml('[==华==丽==的==分==页==码==]');
	});
        },
		afterBlur: function(){this.sync();}
		
    });
    prettyPrint();

});
</script>
<script type="text/javascript">
/*设置图片缩略图*/
function setimg(t)
{
document.getElementById("img").value=t
}
/*删除图片*/
function dropThisDiv(t,p)
{
document.getElementById(t).style.display='none'
var str =document.getElementById("ImagePath").value;
var arr = str.split("|");
var nstr="";
for (var i=0; i<arr.length; i++)
{
	if(arr[i]!=p)
	{
		if (nstr!="")
		{
			nstr=nstr+"|";
		}		
		nstr=nstr+arr[i]
	}
}
document.getElementById("ImagePath").value=nstr;
}
/*设置增加图组*/
function valMsg(strValue){
	if (strValue=="") return;
	var objLinkUpload =document.getElementsByName("ImagePath")[0];
	if (objLinkUpload){
		if (objLinkUpload.value!=""){
			objLinkUpload.value = objLinkUpload.value + "|";
		}
		objLinkUpload.value = objLinkUpload.value + strValue;
	}
}
/*浏览图片返回*/
KindEditor.ready(function(K) {
var editor = K.editor({
	fileManagerJson : '../ZKeditor/asp/file_manager_json.asp'
});
K('#flash').click(function() {
	editor.loadPlugin('filemanager', function() {
		editor.plugin.filemanagerDialog({
			viewType : 'VIEW',
			dirName : 'image',
			urlType : 'relative',
			clickFn : function(url, title) {
				K('#img').val(url);
				var pw=document.getElementById("pw").innerHTML;
				var ids=url
				   ids=ids.substr(ids.lastIndexOf("/")+1,ids.lastIndexOf("."))
				   ids=ids.replace(".","")
				var div=pw+'<div class="imgDiv" id="'+ids+'"><label><img src="'+ url + '" border="0" /><br><input type="radio" name="imgradio" onclick="setimg(\''+url+'\')" value="'+url+'" />设为缩略图</label> <a href="javascript:dropThisDiv(\''+ids+'\',\''+url+'\')">删除</a></div>'
				
				K('#pw').html(div);
				K('#ImagePath').val(valMsg(url));
				editor.hideDialog();
			}
		});
	});
});  
  });
</script>
</head>
<body>
<form name="form" action="?action=edit" method="post" >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
  <tr>
    <td height="30" class="topnav"><div>修改=><%= SortName %></div></td>
  </tr>
  <tr>
    <td bgcolor="#ffffff">
   <table width="100%" border=0 align=center cellpadding=2 cellspacing=0 class="stable">
  <tbody>
  <tr>						
    <td class="td" align=right width=127 height=30>分类名称</td>
    <td width="1528" class="td"><input class="inp" style="width: 200px" maxlength="200" name="sortname" value="<%=sortname%>"/> <font color=#ff0000>*</font> </td>
  </tr>
    <tr>
    <td class="td" align=right height=30>页面标题</td>
    <td class="td"> <input class="inp" maxlength="200" style="width: 450px"  name="pagetitle" value="<%=pagetitle%>"/>  
    </td>
  </tr>
  <tr>
    <td class="td" align=right height=30>页面关键词</td>
    <td class="td"> <input class="inp" maxlength="200" style="width: 450px"  name="pagekeywords" value="<%=pagekeywords%>"/>  
    </td>
  </tr>
  <tr>
    <td class="td" align=right height=30>页面描述</td>
    <td class="td">  <textarea class="tex" style="width: 450px" name="pagedesc" rows="3"><%=pagedesc%></textarea>
    </td>
  </tr>
   <tr id="hid8">
    <td class="td" align="right" height="30"><%= SortName %>内容<br><a href="javascript:void(0)" id="insertHtml">插入分页</a></td>
    <td class="td"><textarea  name="content" id="content" rows="3"  style="width:750px; height:400px"><%=replace(""&content&"","'","&#39;")%></textarea></td>
  </tr>
  <tr>
    <td class="td" align=right height=50></td>
    <td class="td">  <input type="hidden" name="sortid" value="<%=sortid%>" />
                    <input class="btn" type="submit" value=" 更 新 " />&nbsp;&nbsp;
                    <input class="btn" type="button" value=" 返 回 " onClick="history.go(-1)"/> &nbsp;&nbsp;
    </td>
  </tr>

    </tbody></table>
   </td>
  </tr>
  
</table>

</form>
<%call footer%>
</body></html>